<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddFieldLocationToPositionSuperviseSheetTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('position_supervise_sheet', function (Blueprint $table) {
            $table->string('lng')->nullable()->comment('lng')->after('score');
            $table->string('lat')->nullable()->comment('lat')->after('lng');
            $table->string('address')->nullable()->comment('地址')->after('lat');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('position_supervise_sheet', function (Blueprint $table) {
            $table->dropColumn('lng');
            $table->dropColumn('lat');
            $table->dropColumn('address');
        });
    }
}
